package com.apotik.legenda.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="apt_activation")
public class Activation implements Serializable {
	private static final long serialVersionUID = 3448025803207298346L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "activation_id")
	private Integer activationId;
	
	@Column(name="activation_key", length=80, nullable = false)
	private String activationKey;
	
	@Column(name="activation_code", length=40, nullable = false)
	private String activationCode;
	
	@Column(name="activation_date", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date activationDate;
	
	@Column(name="apotek_name", nullable = false, length=80)
	private String apotekName;
	
	@Column(name="address", nullable = false, length=100)
	private String address;
	
	@Column(name="phone_office", nullable = false, length=20)
	private String phoneOffice;
	
	@Column(name="email", length=80)
	private String email;
	
	@Column(name="website", length=200)
	private String website;
	
	@Column(name="fax", length=20)
	private String fax;
	
	@Column(name="activation_owner", length=80)
	private String activationOwner;
	
	@Column(name="is_active", nullable = false)
	private boolean isActive;
	
	@ManyToOne
	@JoinColumn(name="city_id", referencedColumnName = "city_id")
	private City cityid;
	
	@ManyToOne
	@JoinColumn(name="province_id", referencedColumnName = "province_id")
	private Province provinceId;

	
	public Integer getActivationId() {
		return activationId;
	}

	public void setActivationId(Integer activationId) {
		this.activationId = activationId;
	}

	public String getActivationKey() {
		return activationKey;
	}

	public void setActivationKey(String activationKey) {
		this.activationKey = activationKey;
	}

	public String getActivationCode() {
		return activationCode;
	}

	public void setActivationCode(String activationCode) {
		this.activationCode = activationCode;
	}

	public Date getActivationDate() {
		return activationDate;
	}

	public void setActivationDate(Date activationDate) {
		this.activationDate = activationDate;
	}

	public String getApotekName() {
		return apotekName;
	}

	public void setApotekName(String apotekName) {
		this.apotekName = apotekName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhoneOffice() {
		return phoneOffice;
	}

	public void setPhoneOffice(String phoneOffice) {
		this.phoneOffice = phoneOffice;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getActivationOwner() {
		return activationOwner;
	}

	public void setActivationOwner(String activationOwner) {
		this.activationOwner = activationOwner;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	public City getCityid() {
		return cityid;
	}

	public void setCityid(City cityid) {
		this.cityid = cityid;
	}

	public Province getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Province provinceId) {
		this.provinceId = provinceId;
	}

}
